package tr.edu.metu.is.mega.server.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import org.eclipse.persistence.annotations.Cache;
import org.eclipse.persistence.annotations.CacheType;

import tr.edu.metu.is.mega.server.core.BaseEntity;

/**
 * The persistent class for the submissionview database table.
 * 
 */
@NamedQueries({
        @NamedQuery(name = "findSubmissions", query = "SELECT S FROM Submissionview s WHERE s.courseid=:courseid and s.teamid=:teamid"),
        @NamedQuery(name = "findSubmissionsWithRevisions", query = "SELECT S FROM Submissionview s WHERE s.courseid=:courseid and (s.teamid=:teamid or s.reviewteamid=:teamid) order by s.sactivitypkid") })
@Entity
@Cacheable(value = false)
@Cache(type = CacheType.NONE, // Cache nothing
expiry = 0, alwaysRefresh = true)
public class Submissionview implements Serializable, BaseEntity {

    private static final long serialVersionUID = 5059402084913020715L;

    @Id
    private Integer pkid;

    private Integer courseid;

    private String description;

    private Timestamp duedate;

    @Column(name = "fk_activity")
    private Integer fkActivity;

    private Integer reviewsubid;

    private Timestamp reviewdate;

    private Timestamp reviewdue;

    private String reviewfile;

    private String reviewteam;

    private Integer reviewteamid;

    private Integer sactivitypkid;

    private Integer submissionid;

    private Timestamp submissiondate;

    private String submissionfile;

    private String submissiontype;

    private String submitter;

    private Integer teamid;

    private String teamname;

    public Submissionview() {
    }

    public Integer getCourseid() {
        return this.courseid;
    }

    public void setCourseid(Integer courseid) {
        this.courseid = courseid;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Timestamp getDuedate() {
        return this.duedate;
    }

    public void setDuedate(Timestamp duedate) {
        this.duedate = duedate;
    }

    public Integer getFkActivity() {
        return this.fkActivity;
    }

    public void setFkActivity(Integer fkActivity) {
        this.fkActivity = fkActivity;
    }

    public Timestamp getReviewdate() {
        return this.reviewdate;
    }

    public void setReviewdate(Timestamp reviewdate) {
        this.reviewdate = reviewdate;
    }

    public String getReviewfile() {
        return this.reviewfile;
    }

    public void setReviewfile(String reviewfile) {
        this.reviewfile = reviewfile;
    }

    public String getReviewteam() {
        return this.reviewteam;
    }

    public void setReviewteam(String reviewteam) {
        this.reviewteam = reviewteam;
    }

    public Integer getSactivitypkid() {
        return this.sactivitypkid;
    }

    public void setSactivitypkid(Integer sactivitypkid) {
        this.sactivitypkid = sactivitypkid;
    }

    public Timestamp getSubmissiondate() {
        return this.submissiondate;
    }

    public void setSubmissiondate(Timestamp submissiondate) {
        this.submissiondate = submissiondate;
    }

    public String getSubmissionfile() {
        return this.submissionfile;
    }

    public void setSubmissionfile(String submissionfile) {
        this.submissionfile = submissionfile;
    }

    public String getSubmissiontype() {
        return this.submissiontype;
    }

    public void setSubmissiontype(String submissiontype) {
        this.submissiontype = submissiontype;
    }

    public String getSubmitter() {
        return this.submitter;
    }

    public void setSubmitter(String submitter) {
        this.submitter = submitter;
    }

    public Integer getTeamid() {
        return this.teamid;
    }

    public void setTeamid(Integer teamid) {
        this.teamid = teamid;
    }

    public String getTeamname() {
        return this.teamname;
    }

    public void setTeamname(String teamname) {
        this.teamname = teamname;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public Integer getPkid() {
        return pkid;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setPkid(Integer pkid) {
        this.pkid = pkid;
    }

    /**
     * Returns submissionid.
     * 
     * @return the submissionid
     */
    public Integer getSubmissionid() {
        return submissionid;
    }

    /**
     * Sets submissionid value.
     * 
     * @param submissionid the submissionid to set
     */
    public void setSubmissionid(Integer submissionid) {
        this.submissionid = submissionid;
    }

    /**
     * Returns reviewteamid.
     * 
     * @return the reviewteamid
     */
    public Integer getReviewteamid() {
        return reviewteamid;
    }

    /**
     * Sets reviewteamid value.
     * 
     * @param reviewteamid the reviewteamid to set
     */
    public void setReviewteamid(Integer reviewteamid) {
        this.reviewteamid = reviewteamid;
    }

    /**
     * Returns reviewsubid.
     * 
     * @return the reviewsubid
     */
    public Integer getReviewsubid() {
        return reviewsubid;
    }

    /**
     * Sets reviewsubid value.
     * 
     * @param reviewsubid the reviewsubid to set
     */
    public void setReviewsubid(Integer reviewsubid) {
        this.reviewsubid = reviewsubid;
    }

    /**
     * Returns reviewdue.
     * 
     * @return the reviewdue
     */
    public Timestamp getReviewdue() {
        return reviewdue;
    }

    /**
     * Sets reviewdue value.
     * 
     * @param reviewdue the reviewdue to set
     */
    public void setReviewdue(Timestamp reviewdue) {
        this.reviewdue = reviewdue;
    }

}
